/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package entidades;

import java.io.Serializable;
import java.sql.Timestamp;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Version;

/**
 *
 * @author pipe
 */
@Entity
@Table (name = "CUOTAS")
public class Cuota implements Serializable
{    
    @Id
    @Column(name = "ID_CUOTA")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private long id;
    
    @Column (name = "YEAR_CUOTA")
    private int year;
    
    @Column (name = "MESES")
    private boolean meses[];
    
    @Version
    private Timestamp version;

    public Cuota ()
    {
        
    }
    
    public Cuota (int year)
    {
        this.year = year;
    }

    public long getId()
    {
        return id;
    }

    public void setId(long id)
    {
        this.id = id;
    }

    public int getYear()
    {
        return year;
    }

    public void setYear(int year)
    {
        this.year = year;
    }

    public boolean[] getMeses()
    {
        return meses;
    }

    public void setMeses(boolean[] meses)
    {
        this.meses = meses;
    }
}
